/**
 *帮助窗口界面
 * @author none
 *
 */
class TEBHelpWindowView extends how.module.Window {
    private helpTabBar: eui.TabBar;
    private indexFlag: boolean = false;
    private index: number = 0;
    private closeButton: how.Button;
    public constructor() {
        super();
        this.skinName = "TEBHelp";
        this.closeButton.addEventListener(egret.TouchEvent.TOUCH_TAP,this.closeBtnTap,this);
        this.helpTabBar.addEventListener(eui.ItemTapEvent.CHANGE, this.onTabbarChange, this);
        this.helpTabBar.selectedIndex = 0;
        this.indexFlag = false;
    }
    public setTabbarIndex(index: number) {
        this.index = index;
        this.indexFlag = true;
    }
    //tabbar改变时
    public onTabbarChange(): void {
        for (var i = 0; i < 3; i++) {
            this["group" + i].visible = i == this.helpTabBar.selectedIndex;
        }
    }
    private closeBtnTap(){
        this.report(TEBHelpWindowModule.request.close);
    }
}
